package mylibrary.jndi.self;

import java.util.*;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

public class Test {

	public static void main(String[] args) throws NamingException {

		//MyInitialContextFactoryBuilder.initialize();
		System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "jndi.self.MyInitialContextFactory");
		
		//Hashtable hs = new Hashtable();
		//hs.put(Context.INITIAL_CONTEXT_FACTORY, "jndi.self.MyInitialContextFactory");
		
		InitialContext context = new InitialContext();
		
		//System.out.println(context.getEnvironment());
		
		context.bind("111", 12);
		
		InitialContext c = new InitialContext();
		System.out.println(c.lookup("111"));
		
		
		List list = new ArrayList();
		list.add("11122");
		list.add(1);
		list.add(context);
		
		System.out.println(list.get(0));
		System.out.println(list.get(1));
		System.out.println(list.get(2));

		int i = 1, j=i+10;
	}
}
